Field of the Invention
The present invention relates to an image processing technique for image pickup apparatuses such as digital cameras and video cameras, cellular phones, personal computers (such as laptop, desktop, and tablet computers), and game machines, and in particular to an image processing apparatus using combined techniques of tone correction and edge enhancement, a control method therefor, and a storage medium.
Description of the Related Art
Some image processing techniques correct a dark part of blocked-up shadows and a bright part of blown-out highlights in an image to favorable brightness by performing tone correction through gamma conversion or histogram equalization using a tone curve. Depending on scenes, however, using one tone conversion table for one screen will present a problem of tone in a halftone area being sacrificed by producing tone of a dark part and a bright part.
Accordingly, the Retinex model is drawing attention. The Retinex model focuses on the property of human vision that is insensitive to a low-frequency component such as illumination light shed on an overall scene but is sensitive to a high-frequency component such as a contrast between an area being watched and an area surrounding it. Examples of methods for tone correction complying with this model include local contrast correction.
In local contrast correction, tone correction is performed on only a low-frequency component, and this enables natural correction of overall tone while maintaining a local contrast which is a high-frequency component. However, according to this Retinex model, since a high-frequency component is individually handled, and this changes reproduction of an edge, the amount of edge enhancement may not be appropriate when local contrast correction is performed in combination with conventional sharpness processing.
Accordingly, there has been proposed a technique which calculates a sharpness parameter (amount of correction) according to area size when locally processing each of a plurality of areas in a divided image (Japanese Laid-Open Patent Publication (Kokai) No. 2007-228451).
In Japanese Laid-Open Patent Publication (Kokai) No. 2007-228451, a filter size of an illumination component extraction filter is taken as an example of area size. When the filter size is large, edge enhancement is performed with bold sharpness, and when the filter size is small, edge enhancement is performed with relatively fine sharpness.
According to this method, edge enhancement suited to a thickness of an extracted reflectance component is enabled by controlling the amount of sharpness according to a filter size for an illumination component, but edge enhancement is not always suited to a frequency band of a subject because no consideration is given to an actual input image.